package icom.acm.util.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * @author 沈晨辉
 * 
 */


public class SpringBeans implements ISpring{
	private ApplicationContext ctx;
	
	public SpringBeans(String xml){
		ctx = new FileSystemXmlApplicationContext(xml);
	}
	
	@Override
	public Object action(String bean) {		
		return ctx.getBean(bean);
	}

	@Override
	public Class getType(String bean) {
		return ctx.getType(bean);		
	}

}
